package com.wei.test.Service;

public interface RediService {
    boolean set(final String key, Object value);

    boolean set(final String key, Object value, Long expireTime);

    Object get(final String key);

    void remove(final String key);

    boolean exists(String key);

    boolean setNX(final String key, final String value);

    Object getSet(final String key, final String value);

    boolean lock(String lockKey, int timeoutMsecs, int expireMsecs) throws InterruptedException;

    boolean lock(String lockKey) throws InterruptedException;

    void unlock(String lockKey);
}

